define(["pagination"],function(){
    var current = 1;
    // var totalData=100; //共100条数据"jquery",
    var showData = 10; //每页40条
    //分页
    function renderPagination(render,totalData=80,showData=10) {
        console.log(totalData)
        var pageCount = Math.ceil(totalData / showData);
        console.log(pageCount)
        $(".pagination").pagination({
            totalData: totalData,
            pageCount: pageCount,
            showData: showData,
            current: current,
            eleCls: "btn btn-default",
            activeCls: "btn btn-danger active",
            prevCls: "btn btn-primary",
            nextCls: "btn btn-primary",
            // mode: 'fixed',
            keepShowPN: true,
            callback: function (p) {
                current = p.getCurrent();
                console.log("rend")
                render(current);
                // getProductListData(current);
            }
        });
        $(".page").css({
            display:"block"
        });

    }
    return renderPagination;
})